package com.ghxxzx.daglcustom.business_form.domain;

import com.ghxxzx.daglcustom.utils.CreatedTools;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.GenericGenerator;
import org.tmsps.ne4spring.orm.model.DataModel;

import javax.persistence.*;

/**
 * .自定义表单
 * 
 * @author 刘华
 *
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "t_form")
@org.tmsps.ne4spring.annotation.Table("t_form")
public class FormPo extends DataModel {

	@Id
	@GenericGenerator(name = "idGenerator", strategy = "uuid")
	@GeneratedValue(generator = "idGenerator")
	private String kid;// 同时也是 formkey
	// 所属类型
	private String type_kid;

	// 表单编号
	private String code;

	// 表单名称
	private String name;

	// 表单设计的json值
	@Lob
	@Column(name = "widget_json", columnDefinition = "text")
	private String widget_json;
	
	// 表单显示的json值
	@Lob
	@Column(name = "json", columnDefinition = "text")
	private String json;

	// 表单高级json值
	@Lob
	@Column(name = "json_eval", columnDefinition = "text")
	private String json_eval;

	private int status;

	private long created = CreatedTools.getCreated();

}
